::*****************************************GENERAL NAME AND SETTINGS***************************************************::
::PROGRAM TITLE:
set title="Axpect Server Management"
::PROGRAM BUILD VERSION
set build=0_0_1

@echo off
cls

echo %title% -  Started: %TIME% -.- %DATE% >>"Overview ASM.txt"

title %title% - %build%



::************************************GENERAL DISK AND PATH SETTINGS***************************************************::
::DISC PARTITION
set diskpath=c:
::SERVER FOLDER
set servpath=Users\Morten\Desktop\Servers
::MAIN PATH TO HLDS UPDATE TOOL
set hldspath=#HLDS#

::BIN FOLDER PATH
set binpath=bin

::REVISION FOLDER PATH
set revpath=server_revision
set refpath=%fullpath%\%binpath%\%revpath%
::REVISION FILETYPE
set revtype=.asm
::READABLE BY NOTEPAD ?
set readclr=yes

::*********************************************************************************************************************::




::***********************************SETTING THE PATH'S TOGETHER TO MAKE THEM WORK*************************************::
::FULLPATH(USED BY SERVER DOWNLOAD PART)
set fullpath=%diskpath%\%servpath%
::THIS IS THE FILETYPE(NEEDS TO BE CHANGED BEFORE COMPILING)
set filetype=.bat
::THIS IS A CONSTANT VARIABLE THAT MUST NOT BE CHANGED !
set progpath="Axpect Server Management%filetype%"
::*********************************************************************************************************************::


::Source Dedicated Server List:
set dwnserv1="counter-strike source"
set dwnserv2=ageofchivalry
set dwnserv3=diprip
set dwnserv4=dods
set dwnserv5=dystopia
set dwnserv6=episode1
set dwnserv7=esmod
set dwnserv8=garrysmod
set dwnserv9=hl2mp
set dwnserv10=insurgency
set dwnserv11=left4dead
set dwnserv12=left4dead2
set dwnserv13=left4dead2_demo
set dwnserv14=orangebox
set dwnserv15=smashball
set dwnserv16=synergy
set dwnserv17=tf
set dwnserv18=zps

::Half-Life 1 Dedicated Server List
set dwnserv19=cstrike
set dwnserv20=cstrike_beta
set dwnserv21=czero
set dwnserv22=dmc
set dwnserv23=dod
set dwnserv24=gearbox
set dwnserv25=ricochet
set dwnserv26=tfc
set dwnserv27=valve

::Third-Party Game Servers List:
set dwnserv28=ageofchivalry
set dwnserv29=darkesthour
set dwnserv30=darkmessiah
set dwnserv31=defencealliance2
set dwnserv32=diprip
set dwnserv33=dystopia
set dwnserv34=esmod
set dwnserv35=garrysmod
set dwnserv36=insurgency
set dwnserv37=killingfloor
set dwnserv38=marenostrum
set dwnserv39=redochestra
set dwnserv40=ship
set dwnserv41=sin
set dwnserv42=smashball
set dwnserv43=synergy
set dwnserv44=tshb
set dwnserv45=zps

:: THIS IS THE NAME ON THE GAME FOLDERS OR SERVER FOLDERS IF YOU LIKE !
set servername1=CounterStrike-Source
set servername2=
set servername3=
set servername4=
set servername5=
set servername6=
set servername7=
set servername8=
set servername9=
set servername10=
set servername11=
set servername12=
set servername13=
set servername14=
set servername15=
set servername16=
set servername17=
set servername18=
set servername19=
set servername20=
set servername21=
set servername22=
set servername23=
set servername24=
set servername25=
set servername26=
set servername27=
set servername28=
set servername29=
set servername30=
set servername31=
set servername32=
set servername33=
set servername34=
set servername35=
set servername36=
set servername37=
set servername38=
set servername39=
set servername40=
set servername41=
set servername42=
set servername43=
set servername44=
set servername45=
:menu_mod
cls
::This is just to keep in control where i'am in the script when starting and using the execution command!
%diskpath%
cd\
cd %servpath%
::Benith the %menu% and the menu mod starts
echo.
echo                             ______  Axpect Server Management Tool
echo                         ___/_____/\
echo                        /         /\  Alpha build v0.0.1
echo                  _____/__       /  \
echo                _/       /\_____/___ \  Copyright (c) 2009 - 2010, TackyCorp
echo               //       /  \       /\ \
echo       _______//_______/    \     / _\/______
echo      /      / \       \    /    / /        /\
echo   __/      /   \       \  /    / /        / _\__
echo  / /      /     \_______\/    / /        / /   /\
echo /_/______/___________________/ /________/ /___/  \
echo \ \      \    ___________    \ \        \ \   \  /
echo  \_\      \  /          /\    \ \        \ \___\/
echo     \      \/          /  \    \ \        \  /
echo      \_____/          /    \    \ \________\/
echo           /__________/      \    \  /
echo           \   _____  \      /_____\/
echo            \ /    /\  \    /___\/
echo             /____/  \  \  /
echo             \    \  /___\/
echo              \____\/
echo.
echo %clr_full_path%
set /p menu=Console: 

if /i %menu% leq 0                         goto error.menu_mod
if /i %menu% ==  -restart                  goto restart_mod
if /i %menu% ==  -debug        			   goto debug
if /i %menu% ==  -hlds.install             goto install.hlds_mod
if /i %menu% ==  -hlds.update			   goto update.hlds_mod                 
if /i %menu% ==  -help    				   goto help_mod                     
if /i %menu% ==  -exit    				   goto exit_mod  
	::Small command count: 8
::Under here goes the server list::
	::Source(engine) driven DS
if /i %menu% == -install.counterstrikesource		goto chkdwnupd1
if /i %menu% == -install.ageofchivalry				goto chkdwnupd2
if /i %menu% == -install.diprip 					goto chkdwnupd3
if /i %menu% == -install.dayofdefeatsource			goto chkdwnupd4
if /i %menu% == -install.dystopia					goto chkdwnupd5
if /i %menu% == -install.episode1					goto chkdwnupd6
if /i %menu% == -install.eternalsilence				goto chkdwnupd7
if /i %menu% == -install.garrysmod					goto chkdwnupd8
if /i %menu% == -install.halflife2multiplayer		goto chkdwnupd9
if /i %menu% == -install.insurgency					goto chkdwnupd10
if /i %menu% == -install.left4dead					goto chkdwnupd11
if /i %menu% == -install.left4dead2					goto chkdwnupd12
if /i %menu% == -install.left4dead2_demo			goto chkdwnupd13
if /i %menu% == -install.orangebox					goto chkdwnupd14
if /i %menu% == -install.synergy					goto chkdwnupd15
if /i %menu% == -install.teamfortress				goto chkdwnupd16
if /i %menu% == -zombiepanicsource					goto chkdwnupd17
	::Hals-Life 1(engine) driven DS			
if /i %menu% == -install.counterstrike				goto chkdwnupd18
if /i %menu% == -install.counterstrike_beta			goto chkdwnupd19
if /i %menu% == -install.conditionzero				goto chkdwnupd20
if /i %menu% == -install.deathmatchclassic			goto chkdwnupd21
if /i %menu% == -install.dayofdefeat				goto chkdwnupd22
if /i %menu% == -install.gearbox					goto chkdwnupd23
if /i %menu% == -install.ricoshet					goto chkdwnupd24
if /i %menu% == -install.teamfortressclassic		goto chkdwnupd25
if /i %menu% == -install.valve						goto chkdwnupd26
	::Other Third-party game servers
if /i %menu% == -install.darkesthour				goto chkdwnupd27
if /i %menu% == -install.darkmessiah				goto chkdwnupd28
if /i %menu% == -install.defencealliance2			goto chkdwnupd29
if /i %menu% == -install.killingfloor				goto chkdwnupd30
if /i %menu% == -install.marenstrum					goto chkdwnupd31
if /i %menu% == -install.redorchestra				goto chkdwnupd32
if /i %menu% == -install.ship						goto chkdwnupd33
if /i %menu% == -install.sin						goto chkdwnupd34
if /i %menu% == -install.smashball					goto chkdwnupd35
::Count of commands in menu: 44
if /i %menu% geq 1000        			   goto error.menu_mod               

:error.menu_mod

echo.
echo ... You have entered a invalid command!
echo.
echo.
echo ... Push any key to continue!
pause >nul
goto menu_mod

::This is a really simple way to restart the script. It just finds itself and starts it and closes the old one!
	::I need to improve this solution to restart the program.
:restart_mod
%progpath%
exit

:help_mod
cls

echo.
echo.
echo ... *** Welcome to the help section for ASM ***
echo.
echo.
echo ...
if exist %hldspath% (
echo ... [-hlds.update]           : UPDATE HLDS UPDATE TOOL
) else ( 
echo ... [-hlds.install]          : INSTALL HLDS UPDATE TOOL
)
echo ... [-install.servername]    : INSTALL(.)FOLLOWED BY THE SERVERNAME INSTALLS NEW SERVER
echo ... [-update.servername]     : UPDATE(.)FOLLOWED BY THE SERVERNAME UPDATES EXISTING SERVER
echo ... [-server.overview]       : CURRENT OVERVIEW OVER YOUR SERVERS
echo ...
echo ... [-open.readme]           : DISPLAY THE README
echo ... [-open.license]          : DISPLAYS THE LICENSE
echo ... [-]
echo ...
echo ... [-debug]   	          : DEBUGS THE MOST COMMON ERRORS AND TRIES TO FIX THEM
echo ... [-help]    	          : DISPLAYS THE HELP MENU(YOU ARE HERE NOW!)
echo ... [-commands]	          : DISPLAYS ALL AVAILABLE COMMANDS
echo.
echo ... [-exit]                  : Simply enough displays a goodbye message and exits the program.
echo.
echo.
 
echo ... Push any key to continue !
pause >nul
goto menu_mod

::First we are running the check for the source engine game checkers!
:chkdwnupd1
if exist %servername1% (
		 cd %hldspath%
		 goto dwnupd1
) else (
		 md %servername1%
		 goto chkdwnupd1
	   )
:dwnupd1





